const devServer = () => (configFunction) => {
  configFunction.before = function (app, server) {
    app.post('/page', function (req, res) {
      const result = {
        code: 200,
        data: {
          content: [],
          number: 1,
          numberOfElements: 10,
          size: 10,
          totalElements: 1169,
          totalPages: 117,
        },
        msg: "success",
        ts: new Date().getTime()
      }
      res.json(result);
    });
  }

  /* 配置代理地址 */
  // const { proxy } = require("./proxy")
  // configFunction.proxy = proxy

  return configFunction;
}

exports.devServer = devServer